{% extends "head.html" %}
{% block title %}
    vSphere - Guests
{% endblock %}
{% block content %}
    <div class="panel panel-default">
        <div class="panel-heading"><strong>{{ guest_list | length }} Guests</strong></div>
        {% include "guest_list.html" %}
    </div>
    {% if guest_list.has_other_pages %}
        <ul class="pagination pagination-sm">
            {% if guest_list.has_previous %}
                <li><a href="?page={{ guest_list.previous_page_number }}{{ getvars }}{{ hashtag }}" class="prev">&lsaquo;&lsaquo; previous</a></li>
            {% else %}
                <li class="disabled prev"><a href="#">&lsaquo;&lsaquo; previous</a></li>
            {% endif %}
            {% for page in guest_list.paginator.page_range %}
                {% if page %}
                    {% ifequal page guest_list.number %}
                        <li class="current page active"><a href="#">{{ page }}</a></li>
                    {% else %}
                        <li><a href="?page={{ page }}{{ getvars }}{{ hashtag }}" class="page">{{ page }}</a></li>
                    {% endifequal %}
                {% else %}
                    ...
                {% endif %}
            {% endfor %}
            {% if guest_list.has_next %}
                <li><a href="?page={{ guest_list.next_page_number }}{{ getvars }}{{ hashtag }}" class="next">next &rsaquo;&rsaquo;</a></li>
            {% else %}
                <li class="disabled next"><a href="#">next &rsaquo;&rsaquo;</a></li>
            {% endif %}
        </ul>
    {% endif %}
{% endblock %}